package com.company.pangu.aliyun.oss.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * <p>aliyun policy</p >
 *
 * @author youyoukele
 * @version 1.0
 * @date 2021/8/31
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Policy implements Serializable {

    private transient String bucket;

    private transient String path;

    @JsonProperty("Version")
    private String version;

    @JsonProperty("Statement")
    private List<StatementBean> statement;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class StatementBean {

        @JsonProperty("Effect")
        private String effect;

        @JsonProperty("Action")
        private List<String> action;

        @JsonProperty("Resource")
        private List<String> resource;

    }
}
